#include <stdio.h>

int main() {
    int red = 3, white = 3, black = 6;
    int i, j, k, count = 0;

    printf("red\twhite\tblack\n");
    for (i = 1; i <= red; i++) {
        for (j = 1; j <= white; j++) {
            for (k = 1; k <= black; k++) {
                if (i + j + k == 8) {
                    printf("%d\t%d\t%d\n", i, j, k);
                    count ++;
                }
            }
        }
    }
    printf("count: %d\n", count);

    return 0;
}
